// IMPORTANT: this import should always be the first one in compass-component
// main entrypoint to ensure that emotion is reconfigured before any component
// modules generate their stylesheets
import './force-emotion-speedy';
// -------------------------------

export * from './components/leafygreen';
export {
  default as emotion,
  flush,
  hydrate,
  cx,
  merge,
  getRegisteredStyles,
  injectGlobal,
  keyframes,
  css,
  sheet,
  cache,
} from '@leafygreen-ui/emotion';
import ConfirmationModal from './components/modals/confirmation-modal';
import MarketingModal from './components/modals/marketing-modal';
import type {
  ElectronFileDialogOptions,
  ElectronShowFileDialogProvider,
  FileInputBackend,
} from './components/file-picker-dialog';
import FilePickerDialog, {
  createElectronFileInputBackend,
  createJSDomFileInputDummyBackend,
  FileInputBackendProvider,
} from './components/file-picker-dialog';
import { OptionsToggle } from './components/options-toggle';
import {
  ErrorSummary,
  WarningSummary,
} from './components/error-warning-summary';
import { RadioBoxGroup } from './components/radio-box-group';
export {
  SpinLoader,
  SpinLoaderWithLabel,
  CancelLoader,
} from './components/loader';
import { ResizeHandle, ResizeDirection } from './components/resize-handle';
import { Accordion } from './components/accordion';
import { CollapsibleFieldSet } from './components/collapsible-field-set';
export {
  Tab as WorkspaceTab,
  type WorkspaceTabCoreProps,
} from './components/workspace-tabs/tab';
export {
  TabThemeProvider,
  useTabTheme,
} from './components/workspace-tabs/use-tab-theme';
import { WorkspaceTabs } from './components/workspace-tabs/workspace-tabs';
import ResizableSidebar, {
  defaultSidebarWidth,
} from './components/resizeable-sidebar';

export type {
  ItemAction,
  ItemComponentProps,
  ItemSeparator,
  MenuAction,
} from './components/actions/types';
export { splitBySeparator } from './components/actions/utils';
export type { GroupedItemAction } from './components/actions/item-action-group';

export { ItemActionControls } from './components/actions/item-action-controls';
export { ItemActionGroup } from './components/actions/item-action-group';
export { ItemActionMenu } from './components/actions/item-action-menu';
export { DropdownMenuButton } from './components/actions/dropdown-menu-button';

export { DocumentIcon } from './components/icons/document-icon';
export { FavoriteIcon } from './components/icons/favorite-icon';
export { ServerIcon } from './components/icons/server-icon';
export { NoSavedItemsIcon } from './components/icons/no-saved-items-icon';
export { PngIcon } from './components/icons/png-icon';
export { GuideCue as LGGuideCue } from '@leafygreen-ui/guide-cue';
export { Variant as BadgeVariant } from '@leafygreen-ui/badge';
export { Variant as BannerVariant } from '@leafygreen-ui/banner';
export {
  Size as ButtonSize,
  Variant as ButtonVariant,
  type ButtonProps,
} from '@leafygreen-ui/button';
export { SplitButton } from '@leafygreen-ui/split-button';

export { default as LeafyGreenProvider } from '@leafygreen-ui/leafygreen-provider';

export { palette } from '@leafygreen-ui/palette';
export { rgba, lighten, transparentize } from 'polished';
export { default as Portal } from '@leafygreen-ui/portal';
export { Size as RadioBoxSize } from '@leafygreen-ui/radio-box-group';
export { Size as SelectSize } from '@leafygreen-ui/select';
export { useId } from '@react-aria/utils';
export { VisuallyHidden } from '@react-aria/visually-hidden';

export { openToast, closeToast, ToastArea } from './hooks/use-toast';

export { breakpoints, spacing } from '@leafygreen-ui/tokens';
import IndexIcon from './components/index-icon';

export { default as FormFieldContainer } from './components/form-field-container';

export { Modal } from './components/modals/modal';
export { ModalBody } from './components/modals/modal-body';
export { ModalHeader } from './components/modals/modal-header';
export { FormModal } from './components/modals/form-modal';
export { InfoModal } from './components/modals/info-modal';

export {
  useContextMenuGroups,
  type ContextMenuItem,
  type ContextMenuItemGroup,
} from './components/context-menu';

export type {
  FileInputBackend,
  ElectronFileDialogOptions,
  ElectronShowFileDialogProvider,
};
export {
  Accordion,
  CollapsibleFieldSet,
  ConfirmationModal,
  ErrorSummary,
  FilePickerDialog,
  FileInputBackendProvider,
  IndexIcon,
  OptionsToggle,
  RadioBoxGroup,
  ResizeHandle,
  ResizeDirection,
  ResizableSidebar,
  WarningSummary,
  WorkspaceTabs,
  defaultSidebarWidth,
  createElectronFileInputBackend,
  createJSDomFileInputDummyBackend,
  MarketingModal,
};
export {
  useFocusState,
  useFocusStateIncludingUnfocused,
  useHoverState,
  FocusStates,
  type FocusState,
} from './hooks/use-focus-hover';
export { resetGlobalCSS } from './utils/reset-global-css';
export { getScrollbarStyles, useScrollbars } from './hooks/use-scrollbars';
export {
  withDarkMode,
  useDarkMode,
  Themes,
  ThemeProvider,
} from './hooks/use-theme';
export type { Theme } from './hooks/use-theme';
export { useThrottledProps } from './hooks/use-throttled-props';
export { InlineDefinition } from './components/inline-definition';
export type { GlyphName, LGGlyph } from '@leafygreen-ui/icon';
export { createGlyphComponent, createIconComponent } from '@leafygreen-ui/icon';
export {
  SignalPopover,
  SignalHooksProvider,
} from './components/signal-popover';
export type { Signal } from './components/signal-popover';

export { EmptyContent } from './components/empty-content';
export { ErrorBoundary } from './components/error-boundary';
export { FeedbackPopover } from './components/feedback-popover';
export { TabNavBar } from './components/tab-nav-bar';
export { WorkspaceContainer } from './components/workspace-container';
export { InlineInfoLink } from './components/inline-info-link';
export { InteractivePopover } from './components/interactive-popover';
export { ListEditor } from './components/list-editor';
export { Placeholder } from './components/placeholder';
export { useDOMRect } from './hooks/use-dom-rect';
export { VirtualGrid } from './components/virtual-grid';
export { mergeProps } from './utils/merge-props';
export { focusRing, useFocusRing } from './hooks/use-focus-ring';
export { useDefaultAction } from './hooks/use-default-action';
export { useSortControls, useSortedItems } from './hooks/use-sort';
export * from './hooks/use-formatted-date';
export { fontFamilies } from '@leafygreen-ui/tokens';
export { default as BSONValue } from './components/bson-value';
export * as DocumentList from './components/document-list';
export { KeylineCard } from './components/keyline-card';
export { variantColors as codePalette } from '@leafygreen-ui/code';
export { useEffectOnChange } from './hooks/use-effect-on-change';
export { HorizontalRule } from './components/horizontal-rule';
export { IndexBadge, IndexKeysBadge } from './components/index-keys-badge';
export {
  ConfirmationModalVariant,
  ConfirmationModalArea,
  showConfirmation,
  showPrompt,
} from './hooks/use-confirmation';
export { showErrorDetails } from './hooks/use-error-details';
export {
  useHotkeys,
  formatHotkey,
  KeyboardShortcut,
} from './hooks/use-hotkeys';
export { rafraf } from './utils/rafraf';
export { ComboboxWithCustomOption } from './components/combobox-with-custom-option';
export { usePersistedState } from './hooks/use-persisted-state';
export { GuideCue, GuideCueProvider } from './components/guide-cue/guide-cue';
export type { Cue, GroupCue } from './components/guide-cue/guide-cue';
export { PerformanceSignals } from './components/signals';
export { ToastBody } from './components/toast-body';
export { CompassComponentsProvider } from './components/compass-components-provider';
export { type BreadcrumbItem, Breadcrumbs } from './components/breadcrumb';
export {
  urlWithUtmParams,
  RequiredURLSearchParamsProvider,
  useRequiredURLSearchParams,
} from './components/links/link';
export { ChevronCollapse } from './components/chevron-collapse-icon';
export { formatDate } from './utils/format-date';
export { compactBytes, compactNumber } from './utils/format';
export {
  VirtualList,
  type VirtualListRef,
  type VirtualListProps,
  type ItemRenderer as VirtualListItemRenderer,
} from './components/virtual-list';
export { SelectList } from './components/select-list';
export { ParagraphSkeleton } from '@leafygreen-ui/skeleton-loader';
export { InsightsChip } from './components/insights-chip';
export * from './components/drawer-portal';
export { FileSelector } from './components/file-selector';
export {
  DiagramProvider,
  Diagram,
  useDiagram,
  getNodesBounds,
  getViewportForBounds,
  applyLayout,
  getCoordinatesForNewNode,
} from '@mongodb-js/diagramming';
export type {
  EdgeProps,
  NodeProps,
  DiagramProps,
  FieldId,
  DiagramInstance,
  NodeField,
  NodeGlyph,
} from '@mongodb-js/diagramming';
export { useInitialValue } from './hooks/use-initial-value';
export { useCurrentValueRef } from './hooks/use-current-value-ref';
// @experiment Skills in Atlas  | Jira Epic: CLOUDP-346311
export { AtlasSkillsBanner } from './components/atlas-skills-banner';
export { useSyncStateOnPropChange } from './hooks/use-sync-state-on-prop-change';
